package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	rsp, err := http.Get("https://www.baidu.com")
	if err != nil {
		fmt.Println("发生错误")
	}

	defer rsp.Body.Close()

	io.Copy(os.Stdout, rsp.Body)
	resp, err := http.Head("https://www.baidu.com")
	fmt.Println(resp.Header)

}
